<template>
	<view>
		<view class="cu-list grid" :class="['col-'+column,gridBorder?'':'no-border']">
		    <view @click="handleGridTap(index)" class="cu-item align-center" :key="index" v-for="(item,index) in iconList" v-if="index<(column*2)">
			    <image :src="item.url" mode="widthFix" class="image" :style="index==1?'width:40%' : 'width:35%'"></image>
				
				<text class="text-black">{{item.name}}</text>
		    </view>	
		</view>
	</view>
</template>

<script>
	var _self;
	export default {
		name:'gridList',
		data() {
			return {
				
			};
		},
		
		props:{
			column:{
				type:Number,
				default:4
			},
			iconList:{
				type:Array,
				default:[]
			},
			gridBorder:{
				type:Boolean,
				default:false
			}
		},
		
		methods:{
			handleGridTap(e){
				_self.$emit('handleGridTap',e);
			}
		},
		
		created() {
			_self = this;
		}
		
	}
</script>

<style>

</style>
